home *** CD-ROM | disk | FTP | other *** search
- on alertThisEXT message, btn1, cmd1
- global alertWin
- put EMPTY into field "AlertCmd"
- if not voidp(cmd1) then
- put cmd1 into field "AlertCmd"
- end if
- if not voidp(message) then
- put message into field "AlertMessage"
- end if
- updateStage()
- set theLines to the lineCount of member "AlertMessage"
- set msgV to the height of member "AlertMessage"
- set winV to 7 + msgV + 45
- set x to 352
- set y to winV
- tell the stage
- set the rect of alertWin to getCenteredRect(x, y)
- end tell
- repeat with p = 1 to 10
- puppetSprite(p, 0)
- end repeat
- updateStage()
- go("AlertThis")
- repeat with m = 2 to 4
- set the visible of sprite m to 1
- puppetSprite(m, 1)
- updateStage()
- end repeat
- set the visible of sprite 3 to 0
- updateStage()
- repeat with n = 2 to 3
- set the locV of sprite n to winV - 18
- end repeat
- set the locV of sprite 4 to winV - 26
- updateStage()
- if not voidp(btn1) then
- if the number of chars in btn1 > 8 then
- repeat while the number of chars in btn1 > 6
- delete char -30000 of btn1
- end repeat
- set theLastChar to the number of chars in btn1
- put "..." after char theLastChar of btn1
- end if
- end if
- if voidp(btn1) or (btn1 = EMPTY) then
- set btn1 to "OK"
- end if
- set the text of member "AlertBtn" to btn1
- updateStage()
- tell the stage
- playAlert()
- end tell
- tell the stage
- updateStage()
- end tell
- if the machineType = 256 then
- tell the stage
- set the windowType of alertWin to 1
- end tell
- else
- tell the stage
- set the windowType of alertWin to 1
- end tell
- end if
- tell the stage
- set the modal of alertWin to 1
- end tell
- tell the stage
- open(alertWin)
- end tell
- tell the stage
- return EMPTY
- end tell
- end
-